package cn.northsea;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import java.util.Collections;
@ServletComponentScan
@SpringBootApplication
@EnableSwagger2
@MapperScan("cn.northsea.mapper")
public class SeekApplication {
    public static void main(String[] args) {
        SpringApplication.run(SeekApplication.class, args);
    }
//    /**
//     * 分页插件
//     */
//    @Bean
//    public PaginationInnerInterceptor paginationInnerInterceptor() {
//        return new PaginationInnerInterceptor();
//    }
//    @Bean
//    public MybatisPlusInterceptor mybatisPlusInterceptor(){
//        MybatisPlusInterceptor mybatisPlusInterceptor=new MybatisPlusInterceptor();
//        mybatisPlusInterceptor.setInterceptors(Collections.singletonList(paginationInnerInterceptor()));
//        return mybatisPlusInterceptor;
//    }
//
//    @Bean
//    public RestTemplate restTemplate() {
//// 默认的RestTemplate，底层是走JDK的URLConnection方式。
//        return new RestTemplate();
//    }
}
